<?php
session_start();
include('conn.php');


$qry1 = "SELECT * from csvtable where processed = 1";

$qry = mysql_query($qry1);
$data = array();
$i=1;
while($rows = mysql_fetch_array($qry))
{
    $data [] = array("Sr_No" => $i++,
                    "traveldate" => $rows['Bkng_Date'],
                    "sector" => $rows['sector'],
                    "YTNumber" => $rows['YT_Number'], "PassengerName" => $rows['PaxName'],
					"Basic" => $rows['Basic'], "taxes" => $rows['taxes'],"Total" => $rows['Net_Payable'],
                    "Agent" => $rows['Agent'], "EntryDate" => $rows['entrydt'],
                    "UploadResult" => $rows['processed']);
}
echo json_encode($data);
?>

